package com.tx.controller.vcompany;

import com.tx.model.InMessage;
import com.tx.service.WebSocketService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;


@Controller
public class VCompanyController {



	@Autowired
	private WebSocketService ws;

	//不是sendto 的模式，那样只能写很多个，复制张贴复制张贴。用这种方式SimpMessagingTemplate可以在业务层处理
	
	@MessageMapping("/vc/request")
	public void gameInfo(InMessage message) throws InterruptedException{




		
		ws.sendTopicMessage("/topic/vcompany",message);
	}

	
	

}



